In videos used for television broadcasts, DVDS, or the like or images such as JPEG, a color space such as a YUV color space or a YCrCb color space expressed by a luminance component and a chrominance component is used.
The gradation correction (The tone correction) of the videos or images in the color space expressed by the luminance component and the chrominance component is advantageous in view of calculation cost, because a transformation process and an inverse transformation process into other color spaces are unnecessary.
In recent years, apparatuses performing a gradation correcting operation at the time of capturing or displaying videos or images have been appearing increasingly. Since such apparatuses need to perform the gradation correction of videos or images in real time while suppressing the calculation cost, there has increased a need for a high-performance gradation correction in a color space such as a YUV color space or a YCrCb color space expressed by a luminance component and a chrominance component, which makes unnecessary the calculation cost for the transformation and inverse transformation processes into other color spaces.
The YUV (YCrCb) color space includes the luminance component (Y component) representing brightness and the chrominance component (a U component and a V component, or a Cr component and a Cb component) representing a color tone and the gradation in the YUV color space can be corrected by correcting the Y component. However, since there is a gap between axes in the YUV color space and a brightness or color tone axis recognizable to humans, there is a problem in that the visual saturation (chroma) deteriorates as a result of changing the Y component.
To solve the above-mentioned problem, various image processing devices or image processing methods have been proposed.
For example, in the technique described in Patent Document 1, a correction amount of a pixel of interest is determined on the basis of a weighted average luminance value of a local area around the pixel of interest, whereby it is possible to appropriately correct the gradation of a highlighted area or a shadowed area included in an image.
In the technique described in Patent Document 2, a gradation correction value is adjusted on the basis of average luminance of an area determined as a face in an image, whereby it is possible to set the brightness of a person's face, which is most emphasized at the time of viewing an image, to the optimal brightness.
In the technique described in Patent Document 3, a ratio of Yin(x, y) representing a non-corrected Y component value and Yout(x, y) representing a corrected Y component value at a pixel position (x, y) is multiplied by a U component value and a V component value, thereby suppressing the deterioration in visual saturation. This correction can be expressed by Expression 1.
                                          Uout            ⁡                          (                              x                ,                y                            )                                =                                                    Yout                ⁡                                  (                                      x                    ,                    y                                    )                                                            Yin                ⁡                                  (                                      x                    ,                    y                                    )                                                      ⁢                          Uin              ⁡                              (                                  x                  ,                  y                                )                                                    ⁢                                  ⁢                              Vout            ⁡                          (                              x                ,                y                            )                                =                                                    Yout                ⁡                                  (                                      x                    ,                    y                                    )                                                            Yin                ⁡                                  (                                      x                    ,                    y                                    )                                                      ⁢                          Vin              ⁡                              (                                  x                  ,                  y                                )                                                                        Expression        ⁢                                  ⁢        1            
In Expression 1, Uin(x, y), Uout(x, y), Vin(x, y), and Vout(x, y) represent U components and V components before and after the correction at the pixel position (x, y).
In the technique described in Patent Document 4, the relation between a ratio of Y values before and after correction in YCrCb values and a ratio of chroma in the YCrCb color space before and after the correction when a* component and b* component are maintained in a CIE L*a*b* color space is calculated by linear approximation and the Cr component and the Cb component are corrected on the basis thereon. This correction can be applied to the YUV color space. In this case, the correction can be expressed by Expression 2.
                                          Uout            ⁡                          (                              x                ,                y                            )                                =                                    (                                                                                          Yout                      ⁡                                              (                                                  x                          ,                          y                                                )                                                                                    Yin                      ⁡                                              (                                                  x                          ,                          y                                                )                                                                              ×                  p                                +                1                -                p                            )                        ⁢                          Uin              ⁡                              (                                  x                  ,                  y                                )                                                    ⁢                                  ⁢                              Vout            ⁡                          (                              x                ,                y                            )                                =                                    (                                                                                          Yout                      ⁡                                              (                                                  x                          ,                          y                                                )                                                                                    Yin                      ⁡                                              (                                                  x                          ,                          y                                                )                                                                              ×                  p                                +                1                -                p                            )                        ⁢                          Vin              ⁡                              (                                  x                  ,                  y                                )                                                                        Expression        ⁢                                  ⁢        2            
In Expression 2, p represents the value of the relation between Yout(x, y)/Yin(x, y) and the ratio of the U component or the ratio of the V component before and after the correction by estimating the relation by the use of the linear approximation. By setting p=1, Expression 2 becomes equal to Expression 1.    [Patent Document 1] WO 2006/025486    [Patent Document 2] JP-A-2006-318255    [Patent Document 3] JP-A-2007-142500    [Patent Document 4] JP-A-2006-018465